MSC4454: Deprecating Spoiler Fallback In Media Repository#4454
Conversation
…ilered text Signed-off-by: Rye <git@itsrye.dev>
There was a problem hiding this comment.
Implementation requirements: None, the latest version of the proposal only removes parts of the spec
Updated guidelines for handling spoilered content in messages.
…Client#715) ### Description This pull request updates the plain text conversion logic to better handle spoilered text, ensuring that spoiler formatting is replaced with `[Spoiler]` in plain text fallbacks as per [MSC4454](matrix-org/matrix-spec-proposals#4454). **Spoiler handling improvements:** - Spoilered text (delimited by `||`) is now replaced with `[Spoiler]` in the plain text output, matching the MSC4454 specification. #### Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ### Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings ### AI disclosure: - [ ] Partially AI assisted (clarify which code was AI assisted and briefly explain what it does). - [ ] Fully AI generated (explain what all the generated code does in moderate detail). No AI involved
from `[Spoiler]` to `[Spoiler](spoilered text goes here)` to decrease reliance on rich text rendering thanks to [Sugaryyyy (Sugaryy_)](https://github.com/Sugaryyyy) for the idea and bringing up that this is default behaviour in SchildiChat Legacy Signed-off-by: Rye <git@itsrye.dev>
Signed-off-by: Rye <git@itsrye.dev>
Signed-off-by: Rye <git@itsrye.dev>
…er fallbacks Signed-off-by: Rye <git@itsrye.dev>
… description of current client behavior
Signed-off-by: Rye <git@itsrye.dev>
| suggesting uploading spoilered text unencrypted to the media repository. | ||
|
|
||
| This proposal removes those recommendations on how clients should set the plain | ||
| text `body` for spoilered messages. |
There was a problem hiding this comment.
The proposal should explicitly say what the new behavior is (it's now an implementation detail). Something along the lines of
This proposal removes the recommended fallback for spoilers in
body. The plaintext representation of spoilers is left as an implementation detail.
Maybe also mention something about how clients shouldn't use body directly
Spoiler-aware clients SHOULD NOT display
bodyanywhere when there are spoilers informatted_body. For contexts like room list previews and notifications where a plain text representation is needed, clients SHOULD either generate plain text from the HTML locally, or simply display a placeholder message when any spoilers are detected.
applied @tulir feedback he left at matrix-org#4454 (comment) Signed-off-by: Rye <git@itsrye.dev>
Rendered
Implementations:
Signed-off-by: Rye git@itsrye.dev